package com.top.art.bo;

import lombok.Data;
import lombok.ToString;
import org.checkerframework.checker.index.qual.Positive;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * The type Distribute bo.
 *
 * @author hjh
 * @version 2020 /10/6-11:38
 */
@ToString(callSuper = true)
@Data
public class DistributeBO extends TeachersBO {

    @NotBlank(message = "分配方式不能为空")
    private String distributeType;

    @Valid
    private List<TeacherAllocationBO> teachers;

    /**
     * The type Teacher allocation bo.
     */
    @Data
    public static class TeacherAllocationBO {
        @NotBlank(message = "阅卷老师姓名不能为空")
        private String name;
        @NotBlank(message = "阅卷老师账号不能为空")
        private String account;
        @NotNull
        @Positive
        private Integer count;

        private List<String> provinces;

    }
}
